<taglib name="Common\TagLib\Sohtml"/>
<div class="main-title"><h2>{$meta_title}</h2><span class="breadcrumb">[<a href="{:U('Role/role_list')}">商品管理</a><i>&raquo;</i><a href="__SELF__">{$meta_title}</a>]</span></div>
<form action="{:U('Product/product_edit_save')}" method="post" enctype="multipart/form-data">
<table class="table-form">
<tr><th>选择类别：</th>
<td><sohtml:treeselect name="category_id" datasource="ds_category" value="{$data.category_id}" required="require" /></td></tr>
<tr><th>商品名称：</th><td><input type="text" name="product_name" placeholder="商品名称" value="{$data.product_name}" required size="35"/></td></tr>
<tr><th>商品条码：</th><td><input type="text" name="barcode" placeholder="商品条码" value="{$data.barcode}" required size="13"/></td></tr>
<tr><th>销售价格：</th><td><input type="text" name="price" value="{$data.price}" placeholder="销售价格" required/></td></tr>
<tr><th>警告库存：</th><td><input type="text" name="warning_stock" value="{$data.warning_stock|default=10}" placeholder="警告库存" required/></td></tr>
<tr><th>排列次序：</th><td><input type="text" name="ordinal" value="{$data.ordinal|default=999}" placeholder="排列次序" required/></td></tr>
<tr><th>状态：</th><td><sohtml:radio name="state" items="1=上架;0=下架" value="{$data.state}" /></td></tr>
<tr><th>缩略图：</th><td><sohtml:file name="thumb_url" value="{$data.thumb_url}" /></td></tr>
<tr><th>描述：</th><td><textarea name="description" class="editor" cols="90" rows="6">{$data.description}</textarea></td></tr>
</table>
<input type='hidden' name='id' value='{$data.id}'/>
<if condition="$upr['product_edit']"><button type="submit">保存</button></if>
<button type="reset">重置</button>
</form>